package org.ting.book.model;

import lombok.Data;
import org.ting.book.utils.DateUtils;

import java.util.Date;

@Data
public class BorrowRecord {
    private Integer id; //主键
    private Integer userId; //外键依赖 user_info表
    private Integer bookId; //外键依赖 book_info表
    private String bookName;
    private String author;
    private Double price;
    private String publish;
    private Boolean isReturn; //是否已经归还 true已经归还，false未归还
    private Date createTime; //创建记录时间 借阅时间
    private Date updateTime; //修改时间 归还时间

    public String getCreateTime() {
        return DateUtils.dateFormat(createTime);
    }

    public String getUpdateTime() {
        return DateUtils.dateFormat(updateTime);
    }
}
